const state = {
  orderRefresh: false,
  purchasefresh: false,
  mbomtRefresh: false,
  orderMbomRefresh:false,
}

const getters = {
  getOrderRefresh(state) {
    return state.orderRefresh
  },
	getPurchaseRefresh(state) {
	  return state.purchasefresh
	},
	getMbomRefresh(state) {
	  return state.mbomtRefresh
	},
  getOrderMbomRefresh(state) {
	  return state.orderMbomRefresh
	}
}

const mutations = {
  SET_ORDERREFRESH(state, orderRefresh) {
    state.orderRefresh = orderRefresh
  },
  SET_PURCHASEREFRESH(state, purchasefresh) {
    state.purchasefresh = purchasefresh
  },
  SET_MBOMREFRESH(state,mbomRefresh) {
    state.mbomRefresh = mbomRefresh
  },
  SET_ORDERMBOMREFRESH(state,orderMbomRefresh) {
    state.orderMbomRefresh = orderMbomRefresh
  }
}

const actions = {
  setOrderRefresh({
    commit
  }, orderRefresh) {
    commit("SET_ORDERREFRESH", orderRefresh)
  },
  setPurchaseRefresh({
    commit
  }, purchaseRefresh) {
    commit("SET_PURCHASEREFRESH", purchaseRefresh)
  },
  setMbomRefresh({
    commit
  }, mbomRefresh) {
    commit("SET_MBOMREFRESH", mbomRefresh)
  },
  setOrderMbomRefresh({
    commit
  }, orderMbomRefresh) {
    console.log(orderMbomRefresh)
    commit("SET_ORDERMBOMREFRESH", orderMbomRefresh)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
